import { createRouter, createWebHistory } from "vue-router";

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/index.vue')
  },
  {
    path: '/product',
    name: 'product',
    component: () => import('@/views/product.vue')
  },
  {
    path: '/download',
    name: 'download',
    component: () => import('@/views/download.vue')
  },
  {
    path: '/sponsor',
    name: 'sponsor',
    component: () => import('@/views/sponsor.vue')
  },
  {
    path: '/sponsor/detail',
    name: 'sponsor-detail',
    component: () => import('@/views/sponsor-detail.vue')
  }
]

const router = createRouter ({
  history: createWebHistory(),  // 路由采用hash模式
  routes
})

router.beforeEach((to, from) => {
  
})

export default router
